1. Field of Invention
This invention is directed to methods and systems for aspect-oriented programming using a general purpose semantic-invariant construct language.
2. Description of Related Art
Currently, a primary concept in organizing complex software systems is the object-oriented programming paradigm. The idea behind object-oriented programming is to break down software systems into small modular units, such as classes, objects, methods (i.e., functions), and the like. In this way, programs can be more easily understood and debugged. Each modular unit can be separately created, tested and perfected without the programmer worrying about problems involving the other parts of the software system. Essentially, object-oriented programming compartmentalizes software system development.
When compiled, the modular units used in object-oriented programming roughly correspond to separate blocks of code. Since these blocks of code are executed without regard to the structure of other blocks, needless redundant operations often occur. For example, an object may do an addition operation and then a multiplication operation on a vector of operands. In the object-oriented programming paradigm, this would probably be accomplished using separate methods, one for addition and one for multiplication, both involving the use of arrays. First, the addition operands would be read in from the arrays. Then, the addition method would execute and store its results in an intermediate array. Subsequently, the multiplication method would execute and read in the addition method's results. Then, it would perform the multiplication and store the results in a third array. In this simple example, there were four read or write operations to the arrays.
If the addition and multiplication methods could “talk” to one another, the number of read and writes operation could be reduced. Furthermore, the multiplication method must wait for the addition method to complete before it can do anything. The multiplication method cannot take the first result of the addition operation and perform its multiplication operation. The multiplication method has to wait for all of the additions to finish, even though the final result would be the same. Thus, if methods were able to “talk” to one another, the overall speed of the software system can be increased. Some large software systems that are time dependent could greatly benefit from methods “talking” to one another.
Aspect-oriented programming is a new programming paradigm that essentially enables the desired ability for the methods to cross-communicate. Aspect-oriented programming allows programmers to use abstraction and decomposition to break apart large problems into smaller, more manageable subparts, similar to object-oriented programming. However, problems are broken down according to aspectual decomposition, instead of functional decomposition. Aspects facilitate the “talking” among methods. Additionally, aspects can “talk”, or crosscut with each other, resulting in crosscut executables. This avoids the relatively isolated blocks of code that slows down the execution of current object-oriented programming code.